.class public Les/ue0;
.super Les/ve0;
.source "OBEXServerSessionImpl.java"

# interfaces
.implements Ljava/lang/Runnable;


# static fields
.field private static s:I

.field static t:I


# instance fields
.field private m:Les/wp0;

.field private n:Les/re0;

.field private o:Z

.field private volatile p:Z

.field private q:Ljava/lang/Object;

.field private r:Ljava/lang/Thread;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method constructor <init>(Les/pp0;Les/wp0;Les/rp0;Les/ke0;)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    invoke-direct {p0, p1, p4}, Les/ve0;-><init>(Les/pp0;Les/ke0;)V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Les/ue0;->o:Z

    .line 3
    iput-boolean p1, p0, Les/ue0;->p:Z

    .line 4
    new-instance p1, Ljava/lang/Object;

    invoke-direct {p1}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Les/ue0;->q:Ljava/lang/Object;

    const/4 p1, 0x1

    .line 5
    iput-boolean p1, p0, Les/ve0;->l:Z

    .line 6
    iput-object p2, p0, Les/ue0;->m:Les/wp0;

    .line 7
    iput-object p3, p0, Les/ve0;->g:Les/rp0;

    .line 8
    new-instance p2, Ljava/lang/Thread;

    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string p4, "OBEXServerSessionThread-"

    invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 9
    invoke-static {}, Les/ue0;->o()I

    move-result p4

    invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    invoke-direct {p2, p0, p3}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    iput-object p2, p0, Les/ue0;->r:Ljava/lang/Thread;

    .line 10
    invoke-virtual {p2, p1}, Ljava/lang/Thread;->setDaemon(Z)V

    return-void
.end method

.method private a([B)V
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "Connect operation"

    .line 1
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    const/4 v0, 0x3

    .line 2
    aget-byte v1, p1, v0

    const/16 v2, 0x10

    if-ne v1, v2, :cond_4

    .line 3
    array-length v1, p1

    const/4 v3, 0x7

    if-lt v1, v3, :cond_3

    const/4 v1, 0x5

    .line 4
    aget-byte v1, p1, v1

    const/4 v4, 0x6

    aget-byte v4, p1, v4

    invoke-static {v1, v4}, Les/xe0;->a(BB)I

    move-result v1

    const/16 v4, 0xff

    if-lt v1, v4, :cond_2

    .line 5
    iput v1, p0, Les/ve0;->f:I

    int-to-long v4, v1

    const-string v1, "mtu selected"

    .line 6
    invoke-static {v1, v4, v5}, Les/be0;->a(Ljava/lang/String;J)V

    .line 7
    invoke-static {}, Les/ve0;->l()Les/le0;

    move-result-object v1

    .line 8
    invoke-static {p1, v3}, Les/le0;->a([BI)Les/le0;

    move-result-object p1

    .line 9
    invoke-virtual {p0, p1}, Les/ue0;->a(Les/le0;)Z

    move-result v3

    if-nez v3, :cond_0

    const/16 p1, 0xc1

    goto :goto_0

    .line 10
    :cond_0
    invoke-virtual {p0, p1, v1}, Les/ve0;->a(Les/le0;Les/le0;)V

    const/16 v3, 0xd0

    .line 11
    :try_start_0
    iget-object v4, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {v4, p1, v1}, Les/wp0;->a(Les/tp0;Les/tp0;)I

    move-result p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    const-string v4, "onConnect"

    .line 12
    invoke-static {v4, p1}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/16 p1, 0xd0

    :goto_0
    const/4 v3, 0x4

    new-array v3, v3, [B

    const/4 v4, 0x0

    aput-byte v2, v3, v4

    const/4 v2, 0x1

    aput-byte v4, v3, v2

    const/4 v4, 0x2

    .line 13
    iget-object v5, p0, Les/ve0;->h:Les/ke0;

    iget v5, v5, Les/ke0;->c:I

    invoke-static {v5}, Les/xe0;->a(I)B

    move-result v5

    aput-byte v5, v3, v4

    .line 14
    iget-object v4, p0, Les/ve0;->h:Les/ke0;

    iget v4, v4, Les/ke0;->c:I

    invoke-static {v4}, Les/xe0;->b(I)B

    move-result v4

    aput-byte v4, v3, v0

    .line 15
    invoke-virtual {p0, p1, v3, v1}, Les/ve0;->a(I[BLes/le0;)V

    const/16 v0, 0xa0

    if-ne p1, v0, :cond_1

    .line 16
    iput-boolean v2, p0, Les/ve0;->a:Z

    :cond_1
    return-void

    .line 17
    :cond_2
    new-instance p1, Ljava/io/IOException;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Invalid MTU "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 18
    :cond_3
    new-instance p1, Ljava/io/IOException;

    const-string v0, "Corrupted OBEX data"

    invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 19
    :cond_4
    new-instance v1, Ljava/io/IOException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Unsupported client OBEX version "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    aget-byte p1, p1, v0

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v1, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v1
.end method

.method private a([BZ)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "Get operation"

    .line 21
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 22
    invoke-direct {p0}, Les/ue0;->q()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x3

    .line 23
    invoke-static {p1, v0}, Les/le0;->a([BI)Les/le0;

    move-result-object p1

    .line 24
    iget-object v0, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {p0, p1, v0}, Les/ve0;->a(Les/le0;Les/wp0;)Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_1

    const/16 p1, 0xc1

    .line 25
    invoke-virtual {p0, p1, v1}, Les/ve0;->a(ILes/le0;)V

    return-void

    .line 26
    :cond_1
    new-instance v0, Les/se0;

    invoke-direct {v0, p0, p1, p2}, Les/se0;-><init>(Les/ue0;Les/le0;Z)V

    iput-object v0, p0, Les/ue0;->n:Les/re0;

    .line 27
    :try_start_0
    iget-object p1, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {p1, v0}, Les/wp0;->a(Les/up0;)I

    move-result p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    const/16 p2, 0xd3

    :try_start_1
    const-string v0, "onGet"

    .line 28
    invoke-static {v0, p1}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/16 p1, 0xd3

    .line 29
    :goto_0
    iget-object p2, p0, Les/ue0;->n:Les/re0;

    iget-boolean p2, p2, Les/re0;->e:Z

    if-nez p2, :cond_2

    .line 30
    iget-object p2, p0, Les/ue0;->n:Les/re0;

    invoke-virtual {p2, p1}, Les/re0;->a(I)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 31
    :cond_2
    iget-object p1, p0, Les/ue0;->n:Les/re0;

    invoke-virtual {p1}, Les/re0;->close()V

    .line 32
    iput-object v1, p0, Les/ue0;->n:Les/re0;

    return-void

    :catchall_1
    move-exception p1

    .line 33
    iget-object p2, p0, Les/ue0;->n:Les/re0;

    invoke-virtual {p2}, Les/re0;->close()V

    .line 34
    iput-object v1, p0, Les/ue0;->n:Les/re0;

    .line 35
    throw p1
.end method

.method private b(Les/le0;)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "Delete operation"

    .line 9
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 10
    invoke-static {}, Les/ve0;->l()Les/le0;

    move-result-object v0

    .line 11
    invoke-virtual {p0, p1, v0}, Les/ve0;->a(Les/le0;Les/le0;)V

    .line 12
    :try_start_0
    iget-object v1, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {v1, p1, v0}, Les/wp0;->b(Les/tp0;Les/tp0;)I

    move-result p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    const/16 v1, 0xd3

    const-string v2, "onDelete"

    .line 13
    invoke-static {v2, p1}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/16 p1, 0xd3

    .line 14
    :goto_0
    invoke-virtual {p0, p1, v0}, Les/ve0;->a(ILes/le0;)V

    return-void
.end method

.method private b([B)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "Disconnect operation"

    .line 1
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 2
    invoke-direct {p0}, Les/ue0;->q()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x3

    .line 3
    invoke-static {p1, v0}, Les/le0;->a([BI)Les/le0;

    move-result-object p1

    .line 4
    invoke-static {}, Les/ve0;->l()Les/le0;

    move-result-object v0

    const/16 v1, 0xa0

    .line 5
    :try_start_0
    iget-object v2, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {v2, p1, v0}, Les/wp0;->c(Les/tp0;Les/tp0;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    const/16 v1, 0xd3

    const-string v2, "onDisconnect"

    .line 6
    invoke-static {v2, p1}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    const/4 p1, 0x0

    .line 7
    iput-boolean p1, p0, Les/ve0;->a:Z

    .line 8
    invoke-virtual {p0, v1, v0}, Les/ve0;->a(ILes/le0;)V

    return-void
.end method

.method private b([BZ)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "Put/Delete operation"

    .line 15
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 16
    invoke-direct {p0}, Les/ue0;->q()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x3

    .line 17
    invoke-static {p1, v0}, Les/le0;->a([BI)Les/le0;

    move-result-object p1

    .line 18
    iget-object v0, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {p0, p1, v0}, Les/ve0;->a(Les/le0;Les/wp0;)Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_1

    const/16 p1, 0xc1

    .line 19
    invoke-virtual {p0, p1, v1}, Les/ve0;->a(ILes/le0;)V

    return-void

    :cond_1
    if-eqz p2, :cond_2

    .line 20
    invoke-virtual {p1}, Les/le0;->g()Z

    move-result v0

    if-nez v0, :cond_2

    .line 21
    invoke-direct {p0, p1}, Les/ue0;->b(Les/le0;)V

    return-void

    :cond_2
    const-string v0, "Put operation"

    .line 22
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 23
    new-instance v0, Les/te0;

    invoke-direct {v0, p0, p1, p2}, Les/te0;-><init>(Les/ue0;Les/le0;Z)V

    iput-object v0, p0, Les/ue0;->n:Les/re0;

    .line 24
    :try_start_0
    iget-object p1, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {p1, v0}, Les/wp0;->b(Les/up0;)I

    move-result p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    const/16 p2, 0xd3

    :try_start_1
    const-string v0, "onPut"

    .line 25
    invoke-static {v0, p1}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/16 p1, 0xd3

    .line 26
    :goto_0
    iget-object p2, p0, Les/ue0;->n:Les/re0;

    iget-boolean p2, p2, Les/re0;->e:Z

    if-nez p2, :cond_3

    .line 27
    iget-object p2, p0, Les/ue0;->n:Les/re0;

    invoke-virtual {p2, p1}, Les/re0;->a(I)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 28
    :cond_3
    iget-object p1, p0, Les/ue0;->n:Les/re0;

    invoke-virtual {p1}, Les/re0;->close()V

    .line 29
    iput-object v1, p0, Les/ue0;->n:Les/re0;

    return-void

    :catchall_1
    move-exception p1

    .line 30
    iget-object p2, p0, Les/ue0;->n:Les/re0;

    invoke-virtual {p2}, Les/re0;->close()V

    .line 31
    iput-object v1, p0, Les/ue0;->n:Les/re0;

    .line 32
    throw p1
.end method

.method private c([BZ)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string p2, "SetPath operation"

    .line 1
    invoke-static {p2}, Les/be0;->a(Ljava/lang/String;)V

    .line 2
    invoke-direct {p0}, Les/ue0;->q()Z

    move-result p2

    if-nez p2, :cond_0

    return-void

    .line 3
    :cond_0
    array-length p2, p1

    const/4 v0, 0x5

    if-lt p2, v0, :cond_4

    .line 4
    invoke-static {p1, v0}, Les/le0;->a([BI)Les/le0;

    move-result-object p2

    const/4 v0, 0x3

    .line 5
    aget-byte v1, p1, v0

    const/4 v2, 0x1

    and-int/2addr v1, v2

    const/4 v3, 0x0

    if-eqz v1, :cond_1

    const/4 v1, 0x1

    goto :goto_0

    :cond_1
    const/4 v1, 0x0

    .line 6
    :goto_0
    aget-byte p1, p1, v0

    and-int/lit8 p1, p1, 0x2

    if-nez p1, :cond_2

    goto :goto_1

    :cond_2
    const/4 v2, 0x0

    :goto_1
    const-string p1, "setPath backup"

    .line 7
    invoke-static {p1, v1}, Les/be0;->a(Ljava/lang/String;Z)V

    const-string p1, "setPath create"

    .line 8
    invoke-static {p1, v2}, Les/be0;->a(Ljava/lang/String;Z)V

    .line 9
    iget-object p1, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {p0, p2, p1}, Les/ve0;->a(Les/le0;Les/wp0;)Z

    move-result p1

    if-nez p1, :cond_3

    const/16 p1, 0xc1

    const/4 p2, 0x0

    .line 10
    invoke-virtual {p0, p1, p2}, Les/ve0;->a(ILes/le0;)V

    return-void

    .line 11
    :cond_3
    invoke-static {}, Les/ve0;->l()Les/le0;

    move-result-object p1

    .line 12
    invoke-virtual {p0, p2, p1}, Les/ve0;->a(Les/le0;Les/le0;)V

    .line 13
    :try_start_0
    iget-object v0, p0, Les/ue0;->m:Les/wp0;

    .line 14
    invoke-virtual {v0, p2, p1, v1, v2}, Les/wp0;->a(Les/tp0;Les/tp0;ZZ)I

    move-result p2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :catchall_0
    move-exception p2

    const/16 v0, 0xd3

    const-string v1, "onSetPath"

    .line 15
    invoke-static {v1, p2}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/16 p2, 0xd3

    .line 16
    :goto_2
    invoke-virtual {p0, p2, p1}, Les/ve0;->a(ILes/le0;)V

    return-void

    .line 17
    :cond_4
    new-instance p1, Ljava/io/IOException;

    const-string p2, "Corrupted OBEX data"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method private n()Z
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "OBEXServerSession handleRequest"

    .line 1
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Les/ue0;->p:Z

    .line 3
    :try_start_0
    invoke-virtual {p0}, Les/ve0;->j()[B

    move-result-object v1
    :try_end_0
    .catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0

    const/4 v2, 0x1

    .line 4
    iput-boolean v2, p0, Les/ue0;->p:Z

    .line 5
    :try_start_1
    aget-byte v3, v1, v0

    const/16 v4, 0xff

    and-int/2addr v3, v4

    and-int/lit16 v5, v3, 0x80

    if-eqz v5, :cond_0

    const/4 v5, 0x1

    goto :goto_0

    :cond_0
    const/4 v5, 0x0

    :goto_0
    if-eqz v5, :cond_1

    const-string v6, "OBEXServerSession got operation finalPacket"

    .line 6
    invoke-static {v6}, Les/be0;->a(Ljava/lang/String;)V

    :cond_1
    const/4 v6, 0x2

    if-eq v3, v6, :cond_5

    const/4 v6, 0x3

    if-eq v3, v6, :cond_4

    const/4 v6, 0x5

    if-eq v3, v6, :cond_3

    const/16 v6, 0x85

    if-eq v3, v6, :cond_3

    if-eq v3, v4, :cond_2

    packed-switch v3, :pswitch_data_0

    const/16 v1, 0xd1

    const/4 v3, 0x0

    .line 7
    invoke-virtual {p0, v1, v3}, Les/ve0;->a(ILes/le0;)V

    goto :goto_1

    .line 8
    :pswitch_0
    invoke-direct {p0, v1}, Les/ue0;->b([B)V

    goto :goto_1

    .line 9
    :pswitch_1
    invoke-direct {p0, v1}, Les/ue0;->a([B)V

    goto :goto_1

    .line 10
    :cond_2
    invoke-direct {p0}, Les/ue0;->p()V

    goto :goto_1

    .line 11
    :cond_3
    invoke-direct {p0, v1, v5}, Les/ue0;->c([BZ)V

    goto :goto_1

    .line 12
    :cond_4
    :pswitch_2
    invoke-direct {p0, v1, v5}, Les/ue0;->a([BZ)V

    goto :goto_1

    .line 13
    :cond_5
    :pswitch_3
    invoke-direct {p0, v1, v5}, Les/ue0;->b([BZ)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 14
    :goto_1
    iput-boolean v0, p0, Les/ue0;->p:Z

    .line 15
    iget-object v1, p0, Les/ue0;->q:Ljava/lang/Object;

    monitor-enter v1

    .line 16
    :try_start_2
    iget-object v0, p0, Les/ue0;->q:Ljava/lang/Object;

    invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V

    .line 17
    monitor-exit v1

    return v2

    :catchall_0
    move-exception v0

    monitor-exit v1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v0

    :catchall_1
    move-exception v1

    .line 18
    iput-boolean v0, p0, Les/ue0;->p:Z

    .line 19
    throw v1

    :catch_0
    move-exception v1

    .line 20
    iget-boolean v2, p0, Les/ve0;->a:Z

    if-nez v2, :cond_6

    const-string v1, "OBEXServerSession got EOF"

    .line 21
    invoke-static {v1}, Les/be0;->a(Ljava/lang/String;)V

    .line 22
    invoke-virtual {p0}, Les/ue0;->close()V

    return v0

    .line 23
    :cond_6
    throw v1

    :pswitch_data_0
    .packed-switch 0x80
        :pswitch_1
        :pswitch_0
        :pswitch_3
        :pswitch_2
    .end packed-switch
.end method

.method private static declared-synchronized o()I
    .locals 3

    const-class v0, Les/ue0;

    monitor-enter v0

    .line 1
    :try_start_0
    sget v1, Les/ue0;->s:I

    add-int/lit8 v2, v1, 0x1

    sput v2, Les/ue0;->s:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return v1

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method private p()V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "Abort operation"

    .line 1
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 2
    invoke-direct {p0}, Les/ue0;->q()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 3
    :cond_0
    iget-object v0, p0, Les/ue0;->n:Les/re0;

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    const/4 v2, 0x1

    .line 4
    iput-boolean v2, v0, Les/re0;->e:Z

    .line 5
    invoke-virtual {v0}, Les/re0;->close()V

    .line 6
    iput-object v1, p0, Les/ue0;->n:Les/re0;

    const/16 v0, 0xa0

    .line 7
    invoke-virtual {p0, v0, v1}, Les/ve0;->a(ILes/le0;)V

    goto :goto_0

    :cond_1
    const/16 v0, 0xc0

    .line 8
    invoke-virtual {p0, v0, v1}, Les/ve0;->a(ILes/le0;)V

    :goto_0
    return-void
.end method

.method private q()Z
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-boolean v0, p0, Les/ve0;->a:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    return v0

    :cond_0
    const/16 v0, 0xc0

    const/4 v1, 0x0

    .line 2
    invoke-virtual {p0, v0, v1}, Les/ve0;->a(ILes/le0;)V

    const/4 v0, 0x0

    return v0
.end method


# virtual methods
.method a(Les/le0;)Z
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 20
    iget-object v0, p0, Les/ue0;->m:Les/wp0;

    invoke-virtual {p0, p1, v0}, Les/ve0;->a(Les/le0;Les/wp0;)Z

    move-result p1

    return p1
.end method

.method public close()V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Les/ue0;->o:Z

    .line 2
    :goto_0
    iget-boolean v0, p0, Les/ue0;->p:Z

    if-eqz v0, :cond_1

    .line 3
    iget-object v0, p0, Les/ue0;->q:Ljava/lang/Object;

    monitor-enter v0

    .line 4
    :try_start_0
    iget-boolean v1, p0, Les/ue0;->p:Z

    if-eqz v1, :cond_0

    .line 5
    iget-object v1, p0, Les/ue0;->q:Ljava/lang/Object;

    const-wide/16 v2, 0x2bc

    invoke-virtual {v1, v2, v3}, Ljava/lang/Object;->wait(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_1

    :catchall_0
    move-exception v1

    goto :goto_2

    :catch_0
    :cond_0
    :goto_1
    const/4 v1, 0x0

    .line 6
    :try_start_1
    iput-boolean v1, p0, Les/ue0;->p:Z

    .line 7
    monitor-exit v0

    goto :goto_0

    :goto_2
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1

    .line 8
    :cond_1
    invoke-virtual {p0}, Les/ue0;->i()Z

    move-result v0

    if-nez v0, :cond_2

    const-string v0, "OBEXServerSession close"

    .line 9
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 10
    iget-object v0, p0, Les/ue0;->n:Les/re0;

    if-eqz v0, :cond_2

    .line 11
    invoke-virtual {v0}, Les/re0;->close()V

    const/4 v0, 0x0

    .line 12
    iput-object v0, p0, Les/ue0;->n:Les/re0;

    .line 13
    :cond_2
    invoke-super {p0}, Les/ve0;->close()V

    return-void
.end method

.method m()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/ue0;->r:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method public run()V
    .locals 3

    .line 1
    invoke-static {}, Ljava/lang/Thread;->yield()V

    .line 2
    :cond_0
    :try_start_0
    invoke-virtual {p0}, Les/ue0;->i()Z

    move-result v0

    if-nez v0, :cond_1

    iget-boolean v0, p0, Les/ue0;->o:Z

    if-nez v0, :cond_1

    .line 3
    invoke-direct {p0}, Les/ue0;->n()Z

    move-result v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v0, :cond_0

    const-string v0, "OBEXServerSession ends"

    .line 4
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 5
    :try_start_1
    invoke-super {p0}, Les/ve0;->close()V
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "OBEXServerSession close error"

    .line 6
    invoke-static {v1, v0}, Les/be0;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    return-void

    :cond_1
    const-string v0, "OBEXServerSession ends"

    .line 7
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 8
    :try_start_2
    invoke-super {p0}, Les/ve0;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1

    goto :goto_2

    :catch_1
    move-exception v0

    const-string v1, "OBEXServerSession close error"

    .line 9
    invoke-static {v1, v0}, Les/be0;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_2

    :catchall_0
    move-exception v0

    .line 10
    :try_start_3
    const-class v1, Les/ue0;

    monitor-enter v1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_2

    .line 11
    :try_start_4
    sget v2, Les/ue0;->t:I

    add-int/lit8 v2, v2, 0x1

    sput v2, Les/ue0;->t:I

    .line 12
    monitor-exit v1
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_1

    .line 13
    :try_start_5
    iget-boolean v1, p0, Les/ve0;->a:Z

    if-eqz v1, :cond_2

    const-string v1, "OBEXServerSession error"

    .line 14
    invoke-static {v1, v0}, Les/be0;->b(Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_1

    :cond_2
    const-string v1, "OBEXServerSession error"

    .line 15
    invoke-static {v1, v0}, Les/be0;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_2

    :goto_1
    const-string v0, "OBEXServerSession ends"

    .line 16
    invoke-static {v0}, Les/be0;->a(Ljava/lang/String;)V

    .line 17
    :try_start_6
    invoke-super {p0}, Les/ve0;->close()V
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_1

    :goto_2
    return-void

    :catchall_1
    move-exception v0

    .line 18
    :try_start_7
    monitor-exit v1
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_1

    :try_start_8
    throw v0
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_2

    :catchall_2
    move-exception v0

    const-string v1, "OBEXServerSession ends"

    .line 19
    invoke-static {v1}, Les/be0;->a(Ljava/lang/String;)V

    .line 20
    :try_start_9
    invoke-super {p0}, Les/ve0;->close()V
    :try_end_9
    .catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_2

    goto :goto_3

    :catch_2
    move-exception v1

    const-string v2, "OBEXServerSession close error"

    .line 21
    invoke-static {v2, v1}, Les/be0;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 22
    :goto_3
    goto :goto_5

    :goto_4
    throw v0

    :goto_5
    goto :goto_4
.end method
